package com.zrgj.manager.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.zrgj.domain.Admin;
import com.zrgj.manager.mapper.AdminMapper;
import com.zrgj.manager.service.IAdminService;
import org.springframework.stereotype.Component;


@Service
@Component
public class AdminServiceImpl implements IAdminService {
    private AdminMapper adminMapper;

    public AdminServiceImpl(AdminMapper adminMapper) {
        this.adminMapper = adminMapper;
    }

    @Override
    public Admin login(Admin admin) {
        return adminMapper.login(admin);
    }

    @Override
    public Admin findByName(String adminUsername) {
        return adminMapper.findByName(adminUsername);
    }

    @Override
    public void register(Admin admin) {
        adminMapper.register(admin);
    }
}
